<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>The small3d library: small3d</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo_s.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">The small3d library
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="PageDoc"><div class="header">
  <div class="headertitle">
<div class="title"><a class="el" href="namespacesmall3d.html">small3d</a> </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><a class="anchor" id="md_README"></a> <a href="https://github.com/dimi309/small3d">[Source Code]</a> <a href="https://dimi309.github.io/small3d">[API Documentation]</a></p>
<p>Minimalistic, open source library for making 3D games in C++, with Vulkan and OpenGL support</p>
<h1><a class="anchor" id="autotoc_md1"></a>
Sample games</h1>
<ul>
<li><a href="https://github.com/dimi309/small3d-samples/tree/master/avoidthebug">Avoid the Bug</a></li>
<li><a href="https://github.com/dimi309/small3d-samples/tree/master/chasethegoat">Chase the Goat</a></li>
<li><a href="https://github.com/dimi309/small3d-samples/tree/master/frogremixed">Frog Remixed</a></li>
<li><a href="https://github.com/dimi309/small3d-samples/tree/master/gloom">Gloom</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md2"></a>
Tutorial</h1>
<p><a href="https://www.gamedev.net/tutorials/programming/engines-and-middleware/small3d-tutorial-r5655/">https://www.gamedev.net/tutorials/programming/engines-and-middleware/small3d-tutorial-r5655/</a></p>
<h1><a class="anchor" id="autotoc_md3"></a>
Features</h1>
<ul>
<li>3D models loaded from glTF (glb) or Wavefront (obj) files</li>
<li>Other customised meshes and shapes</li>
<li>Animation</li>
<li>Texture mapping</li>
<li>Gouraud shading</li>
<li>Image rendering</li>
<li>Font rendering</li>
<li>Sound</li>
<li>Collision detection</li>
</ul>
<h1><a class="anchor" id="autotoc_md4"></a>
Supported platforms</h1>
<ul>
<li>Windows</li>
<li>MacOS</li>
<li>Linux (tested on Debian, Ubuntu and Fedora)</li>
<li>Android</li>
<li>iOS</li>
</ul>
<h1><a class="anchor" id="autotoc_md5"></a>
Building prerequisites</h1>
<p>The following need to be installed, with the relevant environment variables and tools accessible via the command line:</p>
<ul>
<li>Some compiler, gcc, Visual Studio, clang, etc.</li>
<li>Vulkan SDK (if it will be used)</li>
<li>7zip (only on Windows)</li>
<li>CMake</li>
</ul>
<h1><a class="anchor" id="autotoc_md6"></a>
Building</h1>
<p>Run the build script which is suitable to your platform from the scripts directory (<code>build-vs.bat</code>, <code>build-mingw.bat</code> or <code>build.sh</code>)</p>
<p>Then, the unit tests can be run via the <code>unittests</code> binary from <code>build/bin</code>.</p>
<p>If any of this fails or you would simply like to restart the building procedure, the best way to clean the <a class="el" href="namespacesmall3d.html">small3d</a> directories is by using git: </p><pre class="fragment">git clean -fdx
</pre><p>For building your own project, you need:</p>
<ul>
<li>The header files from the <code>build/include</code> directory</li>
<li>The libraries from the <code>build/lib</code> directory</li>
<li>The shaders from <code>build/shaders</code> directory</li>
</ul>
<p>If you are using cmake, the modules in <code>small3d/cmake</code> can be useful. Check the <code>CMakeLists.txt</code> and <code>src/CMakeLists.txt</code> files for other configuration details (link flags, etc) that may also be required or useful.</p>
<h1><a class="anchor" id="autotoc_md7"></a>
small3d on mobile</h1>
<p>You can build <a class="el" href="namespacesmall3d.html">small3d</a> for mobile platforms by executing either <code>build-android</code> or <code>build-ios</code> from the scripts directory. One sample game, <a href="https://github.com/dimi309/small3d-samples/tree/master/avoidthebug">Avoid the Bug</a> has been ported to both <a href="https://github.com/dimi309/small3d-samples/tree/master/avoidthebug-android">Android</a> and <a href="https://github.com/dimi309/small3d-samples/tree/master/avoidthebug-ios">iOS</a>. I use these projects as a basis for mobile development. Note that, while with the desktop edition of small3dI use GLFW for windowing functionalities and I/O, on mobile I access the native infrastructure directly.</p>
<h1><a class="anchor" id="autotoc_md8"></a>
Referenced libraries</h1>
<p>All <a class="el" href="namespacesmall3d.html">small3d</a> dependencies, apart from the Vulkan SDK, are distributed together with its source code. They can be built by executing a single script (see "Building", above).</p>
<ul>
<li>Vulkan SDK, or glew if building for OpenGL</li>
<li>glfw</li>
<li>glm</li>
<li>png</li>
<li>zlib</li>
<li>ogg</li>
<li>vorbis</li>
<li>portaudio</li>
<li>freetype</li>
<li>bzip </li>
</ul>
</div></div><!-- PageDoc -->
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20
</small></address>
</body>
</html>
